import java.math.*;
import java.util.*;
public class eg7_6 {
    public static void main(String[] args) {
        BigInteger bigPrime = new BigInteger("300000000");
        BigInteger  maxNum = new BigInteger("300000300");
        while(bigPrime.compareTo(maxNum)!=0){
            if(bigPrime.isProbablePrime(23))System.out.println(bigPrime);
            bigPrime =bigPrime.add(BigInteger.ONE);
        }
    }
}
